package com.expressage.service.impl;

import com.expressage.dao.SendMessDao;
import com.expressage.po.SendMess;
import com.expressage.service.SendMessService;
import com.expressage.vo.SendMessVO;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author gh
 * 发件人逻辑访问实现类
 */
@Service
public class SendMessServiceImpl implements SendMessService {
    Logger logger=Logger.getLogger(SendMessServiceImpl.class);
    @Autowired
    SendMessDao sendMessDao;

    @Override
    public List<SendMessVO> findAll() {
        return sendMessDao.findAll();
    }

    @Override
    public SendMessVO findByfid(int fid) {
        return sendMessDao.findByfid(fid);
    }


    @Override
    public List<SendMessVO> find(String fname) {
        return sendMessDao.find(fname);
    }

    @Override
    public boolean addSendMess(SendMess sendMess) {
        return sendMessDao.addSendMess(sendMess)>0?true:false;
    }

    @Override
    public boolean updateSendMess(SendMessVO sendMess) {
        return sendMessDao.updateSendMess(sendMess)>0?true:false;
    }


    @Override
    public boolean deleteSendMess(int[] fid)  {
        return sendMessDao.deleteSendMess(fid)>0?true:false;
    }
}
